Skip to content

Removes the use of the custom OpenClass annotation and the associated kotlin-allopen plugin#595

Closed
314systems wants to merge 3 commits intoVREMSoftwareDevelopment:mainfrom
314systems:allopen
Closed

Removes the use of the custom OpenClass annotation and the associated kotlin-allopen plugin#595
314systems wants to merge 3 commits intoVREMSoftwareDevelopment:mainfrom
314systems:allopen

Conversation

@314systems
Copy link
Contributor

Summary

  • Removes the use of the custom OpenClass annotation and the associated kotlin-allopen plugin

Checklist (required before marking ready)

  • I added or updated unit tests (see app/src/test/)
  • I followed the project's coding style (ktlint) and formatting
  • I ran lint and addressed or documented any warnings
  • CI checks pass (unit tests, coverage, lint)
  • No sensitive data, keys, or secrets are included

Copilot AI review requested due to automatic review settings February 22, 2026 09:03
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request removes the custom @OpenClass annotation and the associated kotlin-allopen plugin, replacing them with Mockito's inline MockMaker for testing. This simplifies the build configuration by eliminating the need to explicitly make Kotlin classes open for mocking purposes.

Changes:

  • Removed the kotlin-allopen plugin and associated configuration from build files
  • Deleted the custom OpenClass annotation definition
  • Removed all usages of the @OpenClass annotation from production classes
  • Added Mockito's mock-maker-inline configuration to enable mocking of final Kotlin classes
  • Added open modifier to two specific methods (selections property and color method) that are overridden by subclasses

Reviewed changes

Copilot reviewed 41 out of 44 changed files in this pull request and generated no comments.

Show a summary per file
File Description
build.gradle Removed kotlin-allopen plugin classpath dependency
app/build.gradle Removed kotlin-allopen plugin and allOpen configuration block
app/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker Added mock-maker-inline configuration to enable mocking of final classes
app/src/main/kotlin/com/vrem/annotation/OpenClass.kt Deleted the custom OpenClass annotation file
app/src/main/kotlin/com/vrem/wifianalyzer/wifi/filter/adapter/BasicFilterAdapter.kt Made selections property open for overriding in SSIDAdapter
app/src/main/kotlin/com/vrem/wifianalyzer/wifi/filter/adapter/EnumFilterAdapter.kt Made color method open for overriding in StrengthAdapter
Multiple production class files (46 files) Removed @OpenClass annotations and associated imports

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@VREMSoftwareDevelopment
Copy link
Owner

Thanks for the PR, but we will pass on this one.

  • Mixes two unrelated changes (Kotlin downgrade + mocking migration)
  • No reason to downgrade Kotlin
  • @OpenClass with all-open plugin already works
  • mock-maker-inline brings JDK 21+ headaches (--add-opens across CI/IDE), possible JaCoCo conflicts, and slower test startup

@codecov
Copy link

codecov bot commented Feb 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (7be50d0) to head (3b4cd4e).

Additional details and impacted files
@@             Coverage Diff             @@
##               main   #595       +/-   ##
===========================================
- Coverage     97.83%      0   -97.84%     
===========================================
  Files           121      0      -121     
  Lines          2581      0     -2581     
  Branches        211      0      -211     
===========================================
- Hits           2525      0     -2525     
+ Misses           19      0       -19     
+ Partials         37      0       -37     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants